package com.example.appjetpackcompose

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.example.appjetpackcompose.databinding.ActivityMainBinding


class MainActivity : AppCompatActivity() {

    lateinit var vb:ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        vb=ActivityMainBinding.inflate(layoutInflater)
        setContentView(vb.root)

        vb.btn1.setOnClickListener{
            startActivity(Intent(this@MainActivity,TestActivity1::class.java))
        }

        vb.btn2.setOnClickListener{
            startActivity(Intent(this@MainActivity,TestActivity2::class.java))
        }
        vb.btn3.setOnClickListener{
            startActivity(Intent(this@MainActivity,TestActivity3::class.java))
        }
        vb.btn4.setOnClickListener {
            startActivity(Intent(this@MainActivity,TestActivity4::class.java).putExtra("extra",1))
        }
        vb.btn5.setOnClickListener {
            startActivity(Intent(this@MainActivity,TestActivity4::class.java).putExtra("extra",2))
        }
        vb.btn6.setOnClickListener {
            startActivity(Intent(this@MainActivity,TestActivity4::class.java).putExtra("extra",3))
        }
    }
}
